Using HBAnyware Command-Line Interface |
![]() |
|
The Command Line Interface (CLI) Client component of HBAnyware provides access to the capabilities of the Remote Management library from a console command prompt. This component is intended for use in scripted operations from within shell scripts, batch files, or the specific platform equivalent.
Using the CLI ClientThe CLI Client is a console application named HBACMD.EXE (Windows) or hbacmd (UNIX). Each time you run this application from the command line, a single operation is performed. The first parameter of this command is the requested operation. When the specified operation is completed, the command prompt is displayed. Most operations retrieve information about an entity on the SAN and display that information on the console. Most of the CLI Client commands require one or more additional parameters that specify the nature of the command. A parameter used by many HBACMD commands specifies the World Wide Port Name of the host bus adapter (HBA) that is the target of the command. For example, the following command displays the port attributes for the HBA with the specified World Wide Port Name: For Windows Systems
HBACMD can be run in out-of-band mode by making the first argument h=<host>. For example:
For Unix Systems
hbacmd can be run in out-of-band mode by making the first argument h=<host>. For example:
Syntax RulesThe syntax rules for HBACMD are as follows:
Out-of-Band AccessOut-of-band (OOB) access enables you to access HBAs via their IP-address or by the name of the host on which they reside. Since HBAs may exist on a host but not be a part of a Fibre Channel network, they will not appear during normal in-band discovery. Thus, OOB access enlarges the number of HBAs that can be queried or modified.
OOB access via HBACMD uses an additional parameter on the command line. The parameter must be the first parameter in the list, coming immediately after HBACMD. The remaining parameters are those documented for each operation.
The format of the OOB parameter is: h={<IPAddress> | <host-name>} Some examples are: h=128.239.91.88 Entering the following:
lists all HBAs running on the host having the specified IP address. If the IP address is not known but the host name is, enter:
If the host is unreachable, the command will return an error. CLI Client Command Reference
Version Syntax: HBACMD Version Description: Displays the current version of the HBAnyware CLI client application. To view the current version enter:
Parameters: None. ListHBAs Syntax: HBACMD ListHBAs Description: Displays a list of the discovered manageable Emulex HBAs and some of their attributes. The list will contain one 6-attribute group for each discovered adapter. Parameters: None. SaveConfig Syntax: HBACMD SaveConfig <wwpn> <filename> <ctrlword> Description: Saves to a file the contents of the driver parameter list for the specified HBA. The file will be a list of parameter definitions, in ASCII, with each definition delimited by a comma. Each definition is of the form <parameter-name>=<parameter-value> The caller may choose to save either the values of the global set or those specific to the referenced HBA. The file created by this command will be stored in the Emulex Repository directory. Parameters: WWPN - The World Wide Port Name of the HBA whose driver parameters are to be saved. This HBA can be either local or remote. filename - The name of the file that will contain the driver parameter list upon successful completion of this command. ctrlword - G = save the global parameter set. N = save the local (adapter-specific) parameter set. HBAAttrib Syntax: HBACMD HBAAttrib <wwpn> Description: Displays a list of all HBA attributes for the HBA with the specified WWPN. To view the HBA attributes for the adapter enter:
Parameters: WWPN - The World Wide Port Name of the HBA. This HBA can be either local or remote. PortAttrib Syntax: HBACMD PortAttrib <wwpn> Description: Displays a list of all port attributes for the port with the specified WWPN. To view the port attributes for the adapter enter:
Parameters: WWPN - The World Wide Port Name of the Port. This port can be either local or remote. PortStat Syntax: HBACMD PortStat <wwpn> Description: Displays all port statistics for the HBA with the specified WWPN. To view the port statistics for the adapter shown enter:
Parameters: WWPN - The World Wide Port Name of the Port. This port can be either local or remote. ServerAttrib Syntax: HBACMD ServerAttrib <WWPN> Description: Displays a list of attributes of the server that is running locally to the specified HBA. To view the server attributes for the HBA enter:
Parameters: WWPN - The World Wide Port Name of any HBA local to the designated server. The HBA itself can be either local or remote. TargetMapping Syntax: HBACMD TargetMapping <wwpn> Description: Displays a list of mapped targets and the LUNs attached to each for the port with the specified WWPN. To view the target mapping for 10:00:00:00:c9:20:08:0c enter:
Parameters: WWPN - The World Wide Port Name of the Port. This port can be either local or remote. Reset Syntax: HBACMD Reset <wwpn> Description: Resets the adapter with the specified WWPN. Resetting an adapter may require several seconds to complete, especially for remote devices. This command will return for additional input only after the reset has finished. To reset an adapter whose WWPN is 10:00:00:00:c9:e:51:2e enter:
Parameters: WWPN - The World Wide Port Name of the Port. This port can be either local or remote. Download Syntax: HBACMD Download <wwpn> <filename> Description: Loads the specified firmware image to the HBA with the
specified WWPN. To
load the firmware image located in hdc190a4.dwc to an HBA with
Parameters: WWPN - The World Wide Port Name of the HBA that is the target of the firmware download. This HBA can be either local or remote. FileName - The file name of the firmware image that is to be loaded. This can be any file that is accessible to the CLI client application. PersistentBinding
Syntax: HBACMD PersistentBinding <wwpn> <source> Description: Queries the presence of any persistent binding that may exist for the specified WWPN. The <source> is used to query either the configured or live state of any binding that may be present. To view the configured persistent binding for an adapter whose WWPN is 10:00:00:00:c9:20:0d:36 enter:
Parameters: WWPN - The World Wide Port Name of the HBA whose persistent binding state is being queried. This HBA can be either local or remote. source - C if the configured state is being queried. L if the live state is being queried. AllNodeInfo Syntax: HBACMD AllNodeInfo <wwpn> Description: Displays target node information for each target that is accessible from the specified HBA. To view the target node data for 10:00:00:00:c9:20:0d:36, enter:
Parameters: WWPN The World Wide Port Name of the HBA whose target node information is being queried. This HBA can be either local or remote. SetPersistentBinding
Syntax: HBACMD SetPersistentBinding <wwpn>
<scope> <bindtype> <ID> \ Description: Sets a persistent binding between a Fibre Channel target and a SCSI bus and target. The binding can be to a target WWPN, target WWNN, or target D_ID. To bind permanently, on behalf of HBA 10:00:00:00:c9:2e:51:2e, target WWPN 20:00:00:d0:b2:00:30:40 to Scsi bus 1, target 3, enter:
To bind immediately, on behalf of HBA 10:00:00:00:c9:2e:51:2e, target D_ID 10101 to Scsi bus 1, target 3, enter:
Parameters:
RemoveAllPersistentBinding
Syntax: HBACMD RemoveAllPersistentBinding <wwpn> Description: Removes all persisting bindings associated with the referenced HBA. To remove all persistent bindings for 10:00:00:00:c9:21:5e:21, enter:
Parameters: WWPN - The World Wide Port Name of the HBA for which all persistent bindings are to be removed. This HBA can be either local or remote. RemovePersistentBinding
Syntax: HBACMD RemovePersistentBinding <wwpn> <bindtype>
<ID> \ Description: Removes a persistent binding between a Fibre Channel target and a SCSI bus and target. The binding to be removed can be to a target WWPN, target WWNN, or target D_ID. To remove, on behalf of HBA 10:00:00:00:c9:2e:51:2e, the binding between target WWPN=20:00:00:d0:b2:00:30:40 and Scsi bus 1, target 3, enter:
To remove, on behalf of HBA 10:00:00:00:c9:2e:51:2e, the binding between target D_ID=10101 and Scsi bus 1, target 3, enter:
Parameters:
BindingCapabilities
Syntax: HBACMD BindingCapabilities <wwpn> Description: Displays the binding capabilities present at the referenced HBA. To view the binding capabilities at 10:00:00:00:c9:21:5e:21, enter:
Parameters: WWPN - The World Wide Port Name of the HBA whose binding capabilities are being queried. This HBA can be either local or remote. BindingSupport
Syntax: HBACMD BindingSupport <wwpn> <source> Description: Displays the binding support available at the reference HBA. To view the configured binding support for 10:00:00:00:c9:21:5e:21, enter: hbacmd bindingsupport 10:00:00:00:c9:21:5e:21 C Parameters: WWPN - The World Wide Port Name of the HBA whose binding support is being queried. This HBA can be either local or remote. source - C if the support is being queried. L if the live support is being queried. SetBindingSupport
Syntax: HBACMD SetBindingSupport <wwpn> <bindflag> Description: Sets the binding support(s) for the referenced HBA. To enable binding support for WWPN and Automap on HBA 10:00:00:00:c9:21:5e:21, enter:
Parameters:
DriverParams Syntax: HBACMD DriverParams <wwpn> Description: Displays the name and values of each driver parameter for the selected HBA. To view the driver parameters for HBA 10:00:00:00:c9:2e:51:2e enter:
Parameters: WWPN - The World Wide Port Name of the HBA whose driver parameters are to be viewed. This HBA can be either local or remote. DriverParamsGlobal Syntax: HBACMD DriverParamsGlobal <wwpn> Description: Displays the name and the global value of each driver parameter for the selected HBA. To view the global driver parameters for HBA 10:00:00:00:c9:2e:51:2e enter:
Parameters: WWPN - The World Wide Port Name of the HBA whose driver parameters are to be viewed. This HBA can be either local or remote. SetDriverParam
Syntax: HBACMD SetDriverParam <wwpn> <ctrlword> <param> <value> Description: Changes the value of the specified driver parameter that is operating the referenced HBA, and to designate the scope of that change. To change the value of the LinkSpeed parameter (for example) for 10:00:00:00:c9:2e:51:2e and make it permanent, enter:
Parameters:
SetBootBios Syntax: HBACMD SetBootBios <wwpn> <ctrlword> Description: Enables or disables the Boot BIOS on the referenced HBA. To enable the Boot BIOS for 10:00:00:00:c9:2e:51:2e, enter:
Parameters:
PciData Syntax: HBACMD PciData <wwpn> Description: Returns PCI configuration data for the HBA specified by the WWPN. For example, type:
Parameters: WWPN - The World Wide Port Name of the HBA whose PCI configuration data is desired. Wakeup Syntax: HBACMD wakeup <wwpn> Description: Returns wakeup parameter data for the HBA specified by the WWPN. For example, type:
Parameters: WWPN - The World Wide Port Name of the HBA whose wakeup parameter data is desired. LoopMap Syntax: HBACMD loopmap <wwpn> Description: Returns the arbitrated loop map data for the HBA specified by the WWPN. For example, type:
Parameters: WWPN - The World Wide Port Name of the HBA whose loopmap is desired. GetBeacon Syntax: HBACMD getbeacon <wwpn> Description: Returns the current beacon status for the HBA specified by the WWPN. For example, type:
Possible responses are:
Parameters: WWPN - The World Wide Port Name of the HBA whose beacon status is desired. SetBeacon Syntax: HBACMD setbeacon <wwpn> <state> Description: Sets the current beacon status for the HBA specified by the WWPN. Example: beacon OFF:
Example: beacon ON:
Possible responses are:
Parameters:
PostTest Syntax: HBACMD posttest <wwpn> Description: Runs the POST test on the HBA specified by the WWPN. Support for remote adapters is out-of-band (Ethernet) only. For example, type:
Below is a sample response: Running POST, polling for results..... Parameters: WWPN - The World Wide Port Name of the HBA to run POST test on. EchoTest Syntax: HBACMD echotest <wwpn1> <wwpn2> <count> <StopOnError> Description: Runs the echo test on the HBAs specified by the WWPN1 and
WWPN2.
For example, type:
Below is a sample response: Echo test: polling for results...... Parameters:
Loopback Syntax: HBACMD loopback <wwpn> <type> <count> <StopOnError> Description: Runs the loop test on the HBA specified by the WWPN.
For example, type:
Here is a sample response: Running Loopback: polling
for results...... Parameters:
Dump Syntax: HBACMD dump <wwpn> Description: Runs the dump diagnostic retrieval command on the HBA specified by the WWPN. This command is supported for local HBAs only. For example, type:
Parameters: WWPN- The World Wide Port Name of the HBA on which to run the dump. DriverConfig Syntax: HBACMD driverconfig <wwpn> elxstor-5-1.20A0.dpv Description: Sets all driver parameters for the HBA specified by WWPN to the driver parameter values contained in the driver parameter file (elxstor-5-1.20A0.dpv in the above example). These files can be easily generated via the HBAnyware Driver Parameter tab. Driver types must match between .dpv file type and host platform HBA. For example, type:
Below is a sample response: hbacmd: Success setting driver configuration parameters to values in .dpv file. Parameters: WWPN - The World Wide Port Name of the HBA on which to set driver parameters. DeleteDumpFiles Syntax: HBACMD deletedumpfiles <wwpn> Description: Deletes all dump files associated with the HBA specified by the WWPN. For example:
Parameters: WWPN - The World Wide Port Name of the HBA whose dump files are to be deleted. |
|
copyright © - Emulex Corporation - all rights reserved - 2006 |